mod attribute_persistence;
mod class_persistence;
mod class_relation_persistence;

pub use attribute_persistence::*;
pub use class_persistence::*;
pub use class_relation_persistence::*;

use crate::database::DataSource;

#[async_trait::async_trait]
pub trait ModelingWriter {
    // async fn write(&self, package: &Package, data_source: &DataSource) -> anyhow::Result<i32>;
}

#[async_trait::async_trait]
pub trait ModelingReader {
    // async fn read(&self, data_source: &DataSource) -> anyhow::Result<Package>;
}

pub trait ClassPersistenceGetter {
    fn table_name() -> anyhow::Result<String> {
        Err(anyhow::anyhow!("没有设置"))
    }
    fn class_persistence() -> anyhow::Result<Option<ClassPersistence>> {
        Ok(None)
    }
}
